import request from '@/utils/request'

// 商品分页和搜索
export const commodityGetListService = (params) =>
  request.get('/commodity/list', { params })
// 商品新增或修改
export const commodityPublishService = (data) =>
  request.post('/commodity/add', data)

// 获取用户端商品列表
export const getHomeData = () =>  request.get('/commodity/first')

// 获取指商品详情
export const getOneCommodity = (goodsId) =>  request.get('/commodity',
  {params: {
  goodsId
}}  )

